Skip to content

GLASGOW_CLASS_5_OMER_ALI_HTML_CSS_WEEK_2#206

Closed
Omer249a wants to merge 1 commit into
CodeYourFuture:masterfrom
Omer249a:master
Closed

GLASGOW_CLASS_5_OMER_ALI_HTML_CSS_WEEK_2#206
Omer249a wants to merge 1 commit into
CodeYourFuture:masterfrom
Omer249a:master

Conversation

@Omer249a
Copy link
Copy Markdown

@Omer249a Omer249a commented Jun 9, 2021

GLASGOW_CLASS_5_OMER_ALI_HTML_CSS_WEEK_2

Volunteers: Are you marking this coursework? You can find a guide on how to mark this coursework in HOW_TO_MARK.md in the root of this repository

Your Details

  • Your Name:
  • Your City:
  • Your Slack Name:

Homework Details

  • Module:
  • Week:

Notes

  • What did you find easy?

  • What did you find hard?

  • What do you still not understand?

  • Any other notes?

Copy link
Copy Markdown
Contributor

@bonboh bonboh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job @Omer249a! One thing to note is that it's generally not a good idea to add set widths to elements, because it makes elements an exact width and not responsive. This is mainly why on a mobile screen the webpage doesn't fit properly and has got a horizontal scrollbar.

I've left a few comments and tips for you to read, but otherwise you don't need to do anything 👍

Comment thread css/style.css
body {
font-family: "Roboto", sans-serif;
-webkit-font-smoothing: antialiased;
font-size: 16px;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
font-size: 16px;

We should never override the browser font size setting, as this means if the user changes their browser setting font size to 24px then this website doesn't increase in size. Also, it's good practice to use relative units like % or rem for font-size instead of px so elements change proportionally when the user changes font size.

Comment thread css/style.css
Comment on lines +37 to +47
nav ul {
display: flex;
justify-content: space-evenly;
list-style: none;
width: 34rem;
}

nav ul a {
text-decoration: none;
color: #9c9fa7;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
nav ul {
display: flex;
justify-content: space-evenly;
list-style: none;
width: 34rem;
}
nav ul a {
text-decoration: none;
color: #9c9fa7;
}
nav ul {
display: flex;
justify-content: space-evenly;
list-style: none;
}
nav ul a {
text-decoration: none;
color: #9c9fa7;
padding: 1rem;
}

It's usually not a good idea to give an element a set width, because it makes it less flexible. Instead, we can remove the width and add padding to the a elements to add space between the links instead

Comment thread css/style.css
color: #9c9fa7;
}

nav ul a:hover {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
nav ul a:hover {
nav ul a:focus,
nav ul a:hover {

When adding hover, we should also add focus so that keyboard users get the same styling when using the Tab key to jump to the link

Comment thread css/style.css
Comment on lines +71 to +72
.hero h1,
h2 {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.hero h1,
h2 {
.hero h1,
.hero h2 {

The second selector h2 will apply the style to all h2 elements on the page. We only want to update the h2 element in the hero section, so we should update the selector to .hero h2

Comment thread index.html
<!-- All the images you need are in the 'img' folder -->

<header>
<img src="img/karma-logo.svg" alt="Logo of the website" />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<img src="img/karma-logo.svg" alt="Logo of the website" />
<img src="img/karma-logo.svg" alt="Karma logo" />

We can make the alt description more descriptive

Comment thread index.html
Comment on lines +45 to +46
<img src="img/icon-devices.svg" alt="Image
of different internet devices" />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<img src="img/icon-devices.svg" alt="Image
of different internet devices" />
<img src="img/icon-devices.svg" alt="Different internet devices" />

We don't need to put "Image" in the alt description as we already know it's an image. Same goes for the other alt descriptions below

@bonboh bonboh closed this Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants